package com.yumeko.controller;

import com.yumeko.entity.TOrder;
import com.yumeko.service.TOrderService;
import com.yumeko.utils.ResponseData;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (TOrder)表控制层
 *
 * @author Zheng Hao
 * @since 2020-03-20 19:31:45
 */
@RestController
public class TOrderController {
    /**
     * 服务对象
     */
    @Resource
    private TOrderService tOrderService;
    //http://localhost:2001/order/create?userId=1&productId=1&count=1&money=100
    @GetMapping("/order/create")
    public ResponseData create(TOrder tOrder) {
        tOrderService.create(tOrder);
        return new ResponseData(200, "订单创建完成");
    }

}